package com.lsp.jdk8;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Author: liusupeng
 * @Date: 2021/6/28 9:41
 */
public class test {

    public static void main(String[] args) {

        List<Integer> integerList = new ArrayList<>();
        integerList.add(1);
        integerList.add(2);
        integerList.add(3);
        List<Integer> collect = integerList.stream().filter(e -> e == 3).collect(Collectors.toList());

        System.out.println(collect);
    }

}
